package com.zxx.pattern.facadePattern.facade1;

/**
 * @author zxx on 2021/7/20
 */
public class WatchTvSwtichFacade {

    Light light;
    AirCondition ac;
    Television tv;
    Screen screen;

    public WatchTvSwtichFacade(Light light, AirCondition ac, Television tv, Screen screen) {
        this.light = light;
        this.ac = ac;
        this.tv = tv;
        this.screen = screen;
    }

    public void on(){
        light.on();
        ac.on();
        screen.down();
        tv.on();
    }

    public void off(){
        tv.off();
        screen.up();
        ac.off();
        light.off();
    }
}
